package com.sooth.system.log.table;

import com.dream.system.annotation.Column;
import com.dream.system.annotation.Id;
import com.dream.system.annotation.Table;
import lombok.Data;

import java.sql.Types;

/**
 * @Description: 操作日志记录
 * @Author: Lion Li
 * @Date: 2023-09-16 23:31:02
 */
@Data
@Table("sys_oper_log")
public class SysOperLog {


    /**
     * 日志主键
     */
    @Id
    @Column(value = "id", jdbcType = Types.BIGINT)
    private Long id;

    /**
     * 租户编号
     */
    @Column(value = "tenant_id", jdbcType = Types.VARCHAR)
    private String tenantId;

    /**
     * 模块标题
     */
    @Column(value = "title", jdbcType = Types.VARCHAR)
    private String title;

    /**
     * 操作信息
     */
    @Column(value = "message", jdbcType = Types.VARCHAR)
    private String message;

    /**
     * 业务类型（0其它 1新增 2修改 3删除）
     */
    @Column(value = "business_type", jdbcType = Types.INTEGER)
    private Integer businessType;

    /**
     * 方法名称
     */
    @Column(value = "method", jdbcType = Types.VARCHAR)
    private String method;

    /**
     * 请求方式
     */
    @Column(value = "request_method", jdbcType = Types.VARCHAR)
    private String requestMethod;

    /**
     * 操作类别（0其它 1后台用户 2手机端用户）
     */
    @Column(value = "operator_type", jdbcType = Types.INTEGER)
    private Integer operatorType;

    /**
     * 操作人员
     */
    @Column(value = "oper_name", jdbcType = Types.VARCHAR)
    private String operName;

    /**
     * 部门名称
     */
    @Column(value = "dept_name", jdbcType = Types.VARCHAR)
    private String deptName;

    /**
     * 请求URL
     */
    @Column(value = "oper_url", jdbcType = Types.VARCHAR)
    private String operUrl;

    /**
     * 主机地址
     */
    @Column(value = "oper_ip", jdbcType = Types.VARCHAR)
    private String operIp;

    /**
     * 操作地点
     */
    @Column(value = "oper_location", jdbcType = Types.VARCHAR)
    private String operLocation;

    /**
     * 请求参数
     */
    @Column(value = "oper_param", jdbcType = Types.VARCHAR)
    private String operParam;

    /**
     * 返回参数
     */
    @Column(value = "json_result", jdbcType = Types.VARCHAR)
    private String jsonResult;

    /**
     * 操作状态（0正常 1异常）
     */
    @Column(value = "status", jdbcType = Types.INTEGER)
    private Integer status;

    /**
     * 错误消息
     */
    @Column(value = "error_msg", jdbcType = Types.VARCHAR)
    private String errorMsg;

    /**
     * 操作时间
     */
    @Column(value = "oper_time", jdbcType = Types.TIMESTAMP)
    private java.util.Date operTime;

    /**
     * 消耗时间
     */
    @Column(value = "cost_time", jdbcType = Types.BIGINT)
    private Long costTime;
}
